#define _CRT_SECURE_NO_WARNINGS 1
#include <set>
#include <unordered_map>
using namespace std;
class Solution {
public:
    bool uniqueOccurrences(vector<int>& arr)
    {
        unordered_map<int, int> unmap;
        for (int i = 0;i < arr.size();i++)
        {
            unmap[arr[i]]++;
        }
        set<int> s;
        for (auto a : unmap)
        {
            s.insert(a.second);
        }
        return unmap.size() == s.size();
    }
};